/*
 *  Copyright (C) 2010 Glauco
 * 
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package org.balisunrise.test;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.math.BigDecimal;
import java.util.Date;

/**
 *
 * @author Glauco
 */
public class TypesEntity {

    private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);

    /**
     * Add PropertyChangeListener.
     *
     * @param listener
     */
    public void addPropertyChangeListener(PropertyChangeListener listener) {
        propertyChangeSupport.addPropertyChangeListener(listener);
    }

    /**
     * Remove PropertyChangeListener.
     *
     * @param listener
     */
    public void removePropertyChangeListener(PropertyChangeListener listener) {
        propertyChangeSupport.removePropertyChangeListener(listener);
    }

    public static final String PROP_bigDecimalType = "bigDecimalType";
    public static final String PROP_booleanType = "booleanType";
    public static final String PROP_byteType = "byteType";
    public static final String PROP_characterType = "characterType";
    public static final String PROP_dateType = "dateType";
    public static final String PROP_doubleType = "doubleType";
    public static final String PROP_floatType = "floatType";
    public static final String PROP_integerType = "integerType";
    public static final String PROP_longType = "longType";
    public static final String PROP_shortType = "shortType";
    public static final String PROP_stringType = "stringType";

    private BigDecimal bigDecimalType;
    private Boolean booleanType;
    private Byte byteType;
    private Character characterType;
    private Date dateType;
    private Double doubleType;
    private Float floatType;
    private Integer integerType;
    private Long longType;
    private Short shortType;
    private String stringType;

    public BigDecimal getBigDecimalType() {
        return bigDecimalType;
    }

    public void setBigDecimalType(BigDecimal bigDecimalType) {
        BigDecimal old = this.bigDecimalType;
        this.bigDecimalType = bigDecimalType;
        propertyChangeSupport.firePropertyChange(PROP_bigDecimalType, old, bigDecimalType);
    }

    public Boolean getBooleanType() {
        return booleanType;
    }

    public void setBooleanType(Boolean booleanType) {
        Boolean old = this.booleanType;
        this.booleanType = booleanType;
        propertyChangeSupport.firePropertyChange(PROP_booleanType, old, booleanType);
    }

    public Byte getByteType() {
        return byteType;
    }

    public void setByteType(Byte byteType) {
        Byte old = this.byteType;
        this.byteType = byteType;
        propertyChangeSupport.firePropertyChange(PROP_byteType, old, byteType);
    }

    public Character getCharacterType() {
        return characterType;
    }

    public void setCharacterType(Character characterType) {
        Character old = this.characterType;
        this.characterType = characterType;
        propertyChangeSupport.firePropertyChange(PROP_characterType, old, characterType);
    }

    public Date getDateType() {
        return dateType;
    }

    public void setDateType(Date dateType){
        Date old = this.dateType;
        this.dateType = dateType;
        propertyChangeSupport.firePropertyChange(PROP_dateType, old, dateType);
    }

    public Double getDoubleType() {
        return doubleType;
    }

    public void setDoubleType(Double doubleType) {
        Double old = this.doubleType;
        this.doubleType = doubleType;
        propertyChangeSupport.firePropertyChange(PROP_doubleType, old, doubleType);
    }

    public Float getFloatType() {
        return floatType;
    }

    public void setFloatType(Float floatType) {
        Float old = this.floatType;
        this.floatType = floatType;
        propertyChangeSupport.firePropertyChange(PROP_floatType, old, floatType);
    }

    public Integer getIntegerType() {
        return integerType;
    }

    public void setIntegerType(Integer integerType) {
        Integer old = this.integerType;
        this.integerType = integerType;
        propertyChangeSupport.firePropertyChange(PROP_integerType, old, integerType);
    }

    public Long getLongType() {
        return longType;
    }

    public void setLongType(Long longType) {
        Long old = this.longType;
        this.longType = longType;
        propertyChangeSupport.firePropertyChange(PROP_longType, old, longType);
    }

    public Short getShortType() {
        return shortType;
    }

    public void setShortType(Short shortType) {
        Short old = this.shortType;
        this.shortType = shortType;
        propertyChangeSupport.firePropertyChange(PROP_shortType, old, shortType);
    }

    public String getStringType() {
        return stringType;
    }

    public void setStringType(String stringType) {
        String old = this.stringType;
        this.stringType = stringType;
        propertyChangeSupport.firePropertyChange(PROP_stringType, old, stringType);
    }

    @Override
    public String toString() {
        return "TypesEntity{" +
                " bigDecimalType=" + bigDecimalType +
                " booleanType=" + booleanType +
                " byteType=" + byteType +
                " characterType=" + characterType +
                " dateType=" + dateType +
                " doubleType=" + doubleType +
                " floatType=" + floatType +
                " integerType=" + integerType +
                " longType=" + longType +
                " shortType=" + shortType +
                " stringType=" + stringType + '}';
    }
}
